<div class="search-panel" style="margin-bottom:0px;">
    <form method="get" action="{:U('Order/order_list')}">
        编号：<input type="text" name="sn" placeholder="订单编号" value="{$search.sn}" />
        姓名：<input type="text" name="name" placeholder="客户姓名" value="{$search.name}" style="width:60px;" />
        电话：<input type="text" name="tel" placeholder="客户电话" value="{$search.tel}" style="width:60px;" />
        工号：<input type="text" name="sellerUserName" placeholder="工号" value="{$search.sellerUserName}" style="width:45px;" />
        订单金额(元)：<input type="text" name="orderAmountMin" value="{$search.orderAmountMin}" style="width:45px;" /> 至 <input type="text" name="orderAmountMax" value="{$search.orderAmountMax}" style="width:45px;" />
        <button type="submit" class="btn-search lnk-submit">搜索</button>
        <if condition="$upr['导出订单']">
            <button type="button" class="btn-export lnk-submit">导出</button>
        </if>
        <button type="button" class="btn-refresh lnk-refresh">刷新</button>
        <input type="hidden" name="action" value="display"/>
    </form>
</div>
<div class="page-statistics-bar">今日总单量|总金额:<strong>0|0.00</strong>, 本月总单量|总金额:<strong>0|0.00</strong>, 本年度总单量|总金额:<strong>0|0.00</strong></div>
<div class="radio-button-set" data-value="{$search.tab}">
    <if condition="$upr['订单列表标签-全部订单']"><input type="radio" id='listTab-all' name="listTab" checked="checked" value='all'><th for="listTab-all">全部订单</th><td></if>    
    <if condition="$upr['订单列表标签-审核退回']"><input type="radio" id='listTab-returnconfirm' name="listTab" value='returnconfirm'><th for="listTab-returnconfirm">审核退回</th><td></if>    
    <if condition="$upr['订单列表标签-待审核']"><input type="radio" id='listTab-unconfirmed' name="listTab" value='unconfirmed'><th for="listTab-unconfirmed">待审核</th><td></if>    
    <if condition="$upr['订单列表标签-待发货']"><input type="radio" id='listTab-unfilled' name="listTab" value='unfilled'><th for="listTab-unfilled">待发货</th><td></if>    
    <if condition="$upr['订单列表标签-已发货']"><input type="radio" id='listTab-delivered' name="listTab" value='delivered'><th for="listTab-delivered">已发货</th><td></if>    
    <if condition="$upr['订单列表标签-已签收']"><input type="radio" id='listTab-signed' name="listTab" value='signed'><th for="listTab-signed">已签收</th><td></if>    
    <if condition="$upr['订单列表标签-拒签']"><input type="radio" id='listTab-refused' name="listTab" value='refused'><th for="listTab-refused">拒签</th><td></if>    
    <if condition="$upr['订单列表标签-已退货']"><input type="radio" id='listTab-returned' name="listTab" value='returned'><th for="listTab-returned">已退货</th><td></if>    
    <if condition="$upr['订单列表标签-已取消']"><input type="radio" id='listTab-canceled' name="listTab" value='canceled'><th for="listTab-canceled">已取消</th><td></if>    
    <if condition="$upr['订单列表标签-已结算']"><input type="radio" id='listTab-settled' name="listTab" value='settled'><th for="listTab-settled">已结算</th><td></if>
    <if condition="$upr['订单列表标签-未结算']"><input type="radio" id='listTab-unsettled' name="listTab" value='unsettled'><th for="listTab-unsettled">未结算</th><td></if>
    <if condition="$upr['订单列表标签-调度订单']"><input type="radio" id='listTab-dispatch' name="listTab" value='dispatch'><th for="listTab-dispatch">调度订单</th><td></if>
</div>
<div id="main-content">
    {$list_content}
</div>
<script type="text/javascript">
    $('input[name="listTab"][value="' + $('.radio-button-set').data('value') + '"]').prop('checked', true);
    $('.search-panel .lnk-submit').click(function () {
        var $frm = $('.search-panel form');
        $frm.find('input[name="action"]').val($(this).text() == '导出' ? 'export' : 'display');
        $frm.submit();
    })
    $('input[name="listTab"]').change(function () {
        var url = location.href;
        var val = $(this).val();
        if (url.indexOf('tab=') > -1) {
            var reg = new RegExp(/tab=\w+/g);
            url = url.replace(reg, 'tab=' + val);
        } else {
            url += (url.indexOf('?') > -1 ? '&' : '?') + 'tab=' + val;
        }
        location.href = url;
    })
</script>